<?php
use think\Session;
use think\Db;

//验证是否登陆
function checkSign()
{
    if (Session::has('subaoID')) {
        return;
    } else {
        return redirect('/GQT/public/index/index/sign',200);
    }

}

function getCookie()
{
    return Session::get('subaoID');
}

function getUserName()
{
    //$user_id = Db::table('usertable')->field(['name'])->where('subaoID', getCookie())->select();
    return Session::get('subaoID');
}
